<template>
<div class="goods-item">
  <img :src="product.cover_url" alt="">
  <div class="goods-info">
    <p>{{product.title}}</p>
    <span class="price"><small>￥</small>{{product.price}}</span>
    <span class="star">{{product.collect_count}}</span>
  </div>
</div>
</template>

<script>

export default {
  name: "GoodsListItem",
  props: {
    product: {
      type:Object,
      default(){
        return {}
      }
    }
  }
}
</script>

<style scoped>
.goods-item {
  width: 46%;
  padding-bottom: 40px;
  position: relative;
}
.goods-item img{
width: 100%;
  border-radius: 5px;
}
.goods-item .goods-info {
font-size: 12px;
  position: absolute;
  bottom: 5px;
  left: 0;
  right: 0;
  overflow: hidden;
  text-align: center;
}
.goods-info p{
overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 3px;
}
.goods-info .price {
color: red;
  margin-right: 20px;
}
.goods-info .star{
  position: relative;
}
</style>